Dot product

Let and be two 2D vectors with their magnitudes and .

Now, we take and compute the length of its projection onto , which we call :

Once we have the length of the projection, the dot product is:

Or:

There is another way:

Why are those two ways the same thing?

BECAUSE, imagine if we use a tasformation with only one dimension for 2D vectors.

Now, with this transformation, the span of the system becomes a line, because both unit vectors are on the same dimension.

So if we put any vector through this transformation, it will go along this line.

Since the components of our vector are adding value to the same dimension, for us to obtain our output vector, we just need to sum its components:

So the new vector/scalar is -2.
And we can see that applying the transformation to the vector is the same operation that we described before.
In the first way, we are taking the norm/magnitudes of each vector and comparing them in one dimension.
In the second way we are collapsing everything in one single dimension(the one of the first vector), then the other vector will automatically project onto the dimension.

TO BE REVISED!
How is this useful?

BECAUSE, the dot product lets you see if two vectors are similar.
In fact, if two vectors are generally going in the same direction, the dot product will be positive and big.

“../z_images/Pasted image 20230305173452.png” could not be found.

On the contrary, if the vectors are dissimilar, the dot product will be smaller.
If the two vectors are perpendicular, the will return 0, and the dot product will be 0:

“../z_images/Pasted image 20230305172918.png” could not be found.

If the two vectors are going in opposite directions, the dot product will be negative.

“../z_images/Pasted image 20230305173626.png” could not be found.

Info

Order doesn't matter, we can take the projection of either one of the two vectors and the dot product will stay the same.

Info

Works only if you want to compare vectors that are in the same vector (dimensional) space.

GPT Explanation

So, the inner product is essentially a way of measuring the similarity or correlation between two vectors. If the vectors are similar, meaning their corresponding components are aligned in a similar direction, the inner product will be a large positive value. If the vectors are dissimilar, meaning their corresponding components are pointing in different directions or canceling each other out, the inner product will be smaller, possibly negative.